#!/usr/bin/python
# _*_ coding: utf8 _*_
#Created: 2010. 7. 5.

##GLOBALS

##IMPORTS
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
import MoGetTraffic

class CronPage(webapp.RequestHandler):
    def get(self):
        Gogo = MoGetTraffic.CGetTraffic()
        Gogo.SendTextToTwitter()
        
        self.response.headers['Content-Type'] = 'text/html'
        self.response.out.write(u'<html><body>')
        
        for a in Gogo.m_stFullText:
            self.response.out.write(a)
            self.response.out.write('<br>')
        
        self.response.out.write(u'</body></html>')

#Global application
application = webapp.WSGIApplication([('/traffic', CronPage)], debug=True)

def main():
    pass
    run_wsgi_app(application)

if __name__ == "__main__":
    main()
